/**
* Vista asociada al contenido 
* con la interfaz que muestra con perfil de usurio tipo 2 (Ver Regiones,Ver Proyecto)
* en el aplicativo.
*/
Ext.define('entgpv11.view.MenuUser02', {
    extend: 'Ext.tab.Panel',
    alias: 'widget.menuuser02',
	requires: [
        'entgpv11.view.ContentMenu02.RegionesListContainer',
		'entgpv11.view.ContentMenu01.NotesContainer'
    ],
    config: 
	{	scrollable: 'vertical',
		tabBarPosition: 'bottom',
		dataId:0,
		rol:'ADM'
    },
	initialize: function () {
        this.callParent(arguments);
		var backButton = {
            xtype: "button",
            ui: "back",
           iconCls: "reply",iconMask: true,
            handler: this.onBackButtonTap,
            scope: this
        };
        this.exitButton = {
            xtype: "button",
            ui: 'decline',
            iconCls: "delete",iconMask: true,
            handler: this.onExitButtonTap,
            scope: this
        };
		var topToolbar = {
            xtype: "toolbar",
            docked: "top",
            title: "Regiones",
            items: [
                backButton,
                { xtype: "spacer" },
                this.exitButton
            ]
        };
        var tabs02 = {
			xtype: 'regioneslistcontainer',
			title: 'Regiones',
			iconCls: 'more'
		};
		var tabs01 = {
			xtype: 'menuuser01',
			title: 'Proyectos',
			iconCls: 'search',
			rol:this.getRol(),
			dataId:this.getDataId()
		};
        var tabs03 = {
            xtype: 'menuuser03',
            title: 'Contabilidad',
            iconCls: 'bookmarks',
            rol: this.getRol(),
            dataId: this.getDataId()
        };
        this.add([topToolbar, tabs01, tabs02, tabs03]);
	   
   },
   onBackButtonTap: function () {
     
        this.fireEvent("backToHomeCommand", this);
    },
    onExitButtonTap: function () {
        this.fireEvent("exitButtonTapCommand", this);
    }
    
   
});